import { createI18n, useI18n } from "vue-i18n";
// 引入语言包
import zh from "./locales/zh";
import en from "./locales/en";

const i18n = createI18n({
    legacy: false,
    locale: localStorage.getItem('locale') || 'zh',
    fallbackLocale: 'zh',
    messages:{
        zh,
        en
    }
})
export default i18n
export { useI18n }
